package com.example.ioc.service.impl;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Service;


@Service
@PropertySource("classpath:xht.properties")
public class ValuesServiceImpl {

    @Value("${springName}")
    private String name;

    @Value("18")
    private Integer age;

    private String catalogName;

    public ValuesServiceImpl(@Value("${catalog.name}") String catalogName) {
        this.catalogName = catalogName;
    }

    @Override
    public String toString() {
        return "ValuesService{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", catalogName='" + catalogName + '\'' +
                '}';
    }
}
